1 <?php
2 session_start();
3 include(
"header.php");
4 include(
"sidebar.php");
5
6 include(
"dbconnection.php");
7         
if(isset($_SESSION[empid]))
8     {
9         header(
"Location: empaccount.php");
10     }
11     
if(isset($_SESSION[custid]))
12     {
13         header(
"Location: account.php");
14     }

15
16 if
(isset($_POST[submit]))
17 {
18 $result = mysql_query(
"SELECT * FROM customer where emailid='$_POST[loginid]'");
19
20     
if(mysql_num_rows($result) == 1)
21     {
22         header(
"Location: changepassword.php?emailid=$_POST[loginid]");
23     }
24     
else
25     {
26         $logres =
"Email ID is not exit in E-workshop database";
27     }
28 }
29
30 ?>
31         
32                             
33         <div id=
"main">
34             
35             <a name=
"TemplateInfo"></a>
36             <h1>Forgot password</h1>
37             <p>Please enter Email ID to reset password </p>
38           <form id=
"form1" name="form1" method="post" action="" onsubmit="return validate()">
39           <table width=
"466" height="122" border="0">
40             <tr>
41               <th colspan=
"2" scope="row"><font color="#FF0000"><b><?php echo $logres; ?></b></font></th>
42             </tr>
43             <tr>
44               <th width=
"122" height="39" scope="row">Email ID</th>
45               <td width=
"334"><input name="loginid" type="text" id="loginid" size="50" /></td>
46             </tr>
47             <tr>
48               <th scope=
"row">&nbsp;</th>
49               <td><input name=
"submit" type="submit" class="button" id="submit" value="Recover password" /></td>
50             </tr>
51             <tr>
52               <th scope=
"row">&nbsp;</th>
53               <td>&nbsp;</td>
54             </tr>
55             </table>
56         </form>
57             <p>&nbsp;</p>
58         </div>
59         
60 <!-- wrap ends here -->
61 </div>
62         
63 <?php
64 include(
"footer.php");
65 ?>


Gõ tìm kiếm nhanh...